 Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function (color) {
        return {
            
            radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 },
            stops: [
                [0, color],
                [1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
            ]
        };
    });


$(function() {
    $.getJSON('kalkulasiSuara.php?kategori=sema', function(data) {
        $('#container-sema').highcharts({
            chart: {
                
                backgroundColor:'rgba(255, 255, 255, 0.5)',
                plotBackgroundColor: null,
                plotBorderWidth: 1, //null,
                plotShadow: false
            },
            title: {
                text: 'Hasil Vote PEMIRA Calon Ketua dan Wakil Ketua SEMA 2014/2015'
            },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                        style: {
                            color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                        }
                    }
                }
            },
            series: [{
                    type: 'pie',
                    name: 'Presentase Jumlah Suara',
                    data: data,
                }]
        });

    });
});

$(function() {
    $.getJSON('kalkulasiSuara.php?kategori=tingkat1', function(data) {
        $('#container-tingkat1').highcharts({
            chart: {
                backgroundColor:'rgba(255, 255, 255, 0.5)',
                
                plotBackgroundColor: null,
                plotBorderWidth: 1, //null,
                plotShadow: false
            },
            title: {
                text: 'Hasil Vote PEMIRA Ketua Angkatan Tingkat 1'
            },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                        style: {
                            color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                        }
                    }
                }
            },
            series: [{
                    type: 'pie',
                    name: 'Presentase Jumlah Suara',
                    data: data,
                }]
        });

    });
});


$(function() {
    $.getJSON('kalkulasiSuara.php?kategori=tingkat2', function(data) {
        $('#container-tingkat2').highcharts({
            chart: {
                backgroundColor:'rgba(255, 255, 255, 0.5)',
                plotBackgroundColor: null,
                plotBorderWidth: 1, //null,
                plotShadow: false
            },
            title: {
                text: 'Hasil Vote PEMIRA Ketua Angkatan Tingkat 2'
            },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                        style: {
                            color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                        }
                    }
                }
            },
            series: [{
                    type: 'pie',
                    name: 'Presentase Jumlah Suara',
                    data: data,
                }]
        });

    });
});

$(function() {
    $.getJSON('kalkulasiSuara.php?kategori=tingkat3', function(data) {
        $('#container-tingkat3').highcharts({
            chart: {
                backgroundColor:'rgba(255, 255, 255, 0.5)',
                plotBackgroundColor: null,
                plotBorderWidth: 1, //null,
                plotShadow: false
            },
            title: {
                text: 'Hasil Vote PEMIRA Ketua Angkatan Tingkat 3'
            },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                        style: {
                            color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                        }
                    }
                }
            },
            series: [{
                    type: 'pie',
                    name: 'Presentase Jumlah Suara',
                    data: data,
                }]
        });

    });
});


$(function() {
    
    
    $.getJSON('kalkulasiSuara.php?kategori=tingkat4', function(data) {
        
        $('#container-tingkat4').highcharts({
            chart: {
                backgroundColor:'rgba(255, 255, 255, 0.5)',
                plotBackgroundColor: null,
                plotBorderWidth: 1, //null,
                plotShadow: false
            },
            title: {
                text: 'Hasil Vote PEMIRA Ketua Angkatan Tingkat 4'
            },
            tooltip: {
                pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                        style: {
                            color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
                        }
                    }
                }
            },
            series: [{
                    type: 'pie',
                    name: 'Presentase Jumlah Suara',
                    data: data,
                }]
        });

    });
});
